//
//  RichViewController.m
//  Rich
//
//  Created by Kenny Chen on 12/12/7.
//  Copyright (c) 2012年 Kenny Chen. All rights reserved.
//

#import "RichCore.h"
#import "RichViewController.h"
#import "MainMenuViewController.h"

@interface RichViewController ()

@end

@implementation RichViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    
    navigator = [[UINavigationController alloc] init];
    //navigator.navigationBar.hidden = YES;
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    
    [self presentModalViewController:navigator animated:NO];
    
    if ([RichDelegate core]) {
        MainMenuViewController *menuController;
        menuController = [[MainMenuViewController alloc] initWithStyle:UITableViewStylePlain];
        menuController.navigator = navigator;
        [navigator pushViewController:menuController animated:YES];
        [menuController release];
    }
    else {
        // TODO: [Core] Unable to connect to database
    }
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
